package com.freework.util.excel.read.service.rowToObject;

import java.util.List;
import java.util.Map;

import com.freework.freedbm.base.DTO;
import com.freework.util.excel.read.vo.ColVO;
public class RowToObjectFactory {
	public static RowToObjectI	getRowToObject(Class clazz, List<ColVO> cols){
		RowToObjectI ro=null;
		if(clazz==null||Map.class.isAssignableFrom(clazz))
			ro=new RowToMapImpi();
		else if(DTO.class.isAssignableFrom(clazz))
			ro=new RowToDTOImpi();
		else
			ro=new RowToObjectImpi();
		
		ro.init(cols, clazz);
		return ro;
	}
	
	
}
